#ifndef SYMBOL_H
#define SYMBOL_H

#include <iostream>
#include <string>
#include <unordered_map>
#include <utility>
using namespace std;

//to record the symbol and its value(number)
struct symNum {
    string name;    // type
    void* value;
    symNum(string name, void* value) : name(std::move(name)), value(value){}
};


class Symbol {
private:
    unordered_map<string, symNum*> Hash;
public:
    Symbol() = default;
    ~Symbol() = default;

    void addSymbol(const string& name);
    void removeSymbol(const string& name);
    void* getSymbolValue(const string& name);
    bool visited(const string& name);
    
    void printTable();
};

#endif